package com.oc.mba.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * OcOrder entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "oc_order", catalog = "openmba")
public class OcOrder implements java.io.Serializable {

	// Fields

	private Integer id;
	private String orderId;
	private Integer deviceId;
	private Integer paperId;
	private Double orderCost;
	private Short finished;
	private Timestamp orderTime;

	// Constructors

	/** default constructor */
	public OcOrder() {
	}

	/** minimal constructor */
	public OcOrder(String orderId, Integer deviceId, Double orderCost,
			Short finished, Timestamp orderTime) {
		this.orderId = orderId;
		this.deviceId = deviceId;
		this.orderCost = orderCost;
		this.finished = finished;
		this.orderTime = orderTime;
	}

	/** full constructor */
	public OcOrder(String orderId, Integer deviceId, Integer paperId,
			Double orderCost, Short finished, Timestamp orderTime) {
		this.orderId = orderId;
		this.deviceId = deviceId;
		this.paperId = paperId;
		this.orderCost = orderCost;
		this.finished = finished;
		this.orderTime = orderTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "order_id", nullable = false)
	public String getOrderId() {
		return this.orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@Column(name = "device_id", nullable = false)
	public Integer getDeviceId() {
		return this.deviceId;
	}

	public void setDeviceId(Integer deviceId) {
		this.deviceId = deviceId;
	}

	@Column(name = "paper_id")
	public Integer getPaperId() {
		return this.paperId;
	}

	public void setPaperId(Integer paperId) {
		this.paperId = paperId;
	}

	@Column(name = "order_cost", nullable = false, precision = 22, scale = 0)
	public Double getOrderCost() {
		return this.orderCost;
	}

	public void setOrderCost(Double orderCost) {
		this.orderCost = orderCost;
	}

	@Column(name = "finished", nullable = false)
	public Short getFinished() {
		return this.finished;
	}

	public void setFinished(Short finished) {
		this.finished = finished;
	}

	@Column(name = "order_time", nullable = false, length = 19)
	public Timestamp getOrderTime() {
		return this.orderTime;
	}

	public void setOrderTime(Timestamp orderTime) {
		this.orderTime = orderTime;
	}

}